home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / dom / nsIEntropyCollector.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  3KB  |  99 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIEntropyCollector.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIEntropyCollector_h__
  6. #define __gen_nsIEntropyCollector_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. /*
  18.  * If anyone wants to collect the entropy distributed by the
  19.  * event handler, they'll have to implement this CONTRACTID
  20.  */
  21. #define NS_ENTROPYCOLLECTOR_CONTRACTID "@mozilla.org/security/entropy;1"
  22.  
  23. /* starting interface:    nsIEntropyCollector */
  24. #define NS_IENTROPYCOLLECTOR_IID_STR "6f883680-ab9d-11d4-9978-00b0d02354a0"
  25.  
  26. #define NS_IENTROPYCOLLECTOR_IID \
  27.   {0x6f883680, 0xab9d, 0x11d4, \
  28.     { 0x99, 0x78, 0x00, 0xb0, 0xd0, 0x23, 0x54, 0xa0 }}
  29.  
  30. class NS_NO_VTABLE nsIEntropyCollector : public nsISupports {
  31.  public: 
  32.  
  33.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IENTROPYCOLLECTOR_IID)
  34.  
  35.   /**
  36.    * Add the following bytes to the pool of data to be used
  37.    * in gathering entropy.
  38.    */
  39.   /* void randomUpdate (in buffer entropy, in long bufLen); */
  40.   NS_IMETHOD RandomUpdate(void * entropy, PRInt32 bufLen) = 0;
  41.  
  42. };
  43.  
  44. /* Use this macro when declaring classes that implement this interface. */
  45. #define NS_DECL_NSIENTROPYCOLLECTOR \
  46.   NS_IMETHOD RandomUpdate(void * entropy, PRInt32 bufLen); 
  47.  
  48. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  49. #define NS_FORWARD_NSIENTROPYCOLLECTOR(_to) \
  50.   NS_IMETHOD RandomUpdate(void * entropy, PRInt32 bufLen) { return _to RandomUpdate(entropy, bufLen); } 
  51.  
  52. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  53. #define NS_FORWARD_SAFE_NSIENTROPYCOLLECTOR(_to) \
  54.   NS_IMETHOD RandomUpdate(void * entropy, PRInt32 bufLen) { return !_to ? NS_ERROR_NULL_POINTER : _to->RandomUpdate(entropy, bufLen); } 
  55.  
  56. #if 0
  57. /* Use the code below as a template for the implementation class for this interface. */
  58.  
  59. /* Header file */
  60. class nsEntropyCollector : public nsIEntropyCollector
  61. {
  62. public:
  63.   NS_DECL_ISUPPORTS
  64.   NS_DECL_NSIENTROPYCOLLECTOR
  65.  
  66.   nsEntropyCollector();
  67.  
  68. private:
  69.   ~nsEntropyCollector();
  70.  
  71. protected:
  72.   /* additional members */
  73. };
  74.  
  75. /* Implementation file */
  76. NS_IMPL_ISUPPORTS1(nsEntropyCollector, nsIEntropyCollector)
  77.  
  78. nsEntropyCollector::nsEntropyCollector()
  79. {
  80.   /* member initializers and constructor code */
  81. }
  82.  
  83. nsEntropyCollector::~nsEntropyCollector()
  84. {
  85.   /* destructor code */
  86. }
  87.  
  88. /* void randomUpdate (in buffer entropy, in long bufLen); */
  89. NS_IMETHODIMP nsEntropyCollector::RandomUpdate(void * entropy, PRInt32 bufLen)
  90. {
  91.     return NS_ERROR_NOT_IMPLEMENTED;
  92. }
  93.  
  94. /* End of implementation class template. */
  95. #endif
  96.  
  97.  
  98. #endif /* __gen_nsIEntropyCollector_h__ */
  99.